package com.pine.dcts.handler;


import com.pine.dcts.common.Result;
import com.pine.dcts.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/task")
@RestController
public class TaskHandler {

    @Autowired
    private TaskService taskService;

    @Autowired
private ThreadPoolTaskExecutor threadPoolTaskExecutor;
    @GetMapping("/start")
    public Result start(Integer jobId){
        taskService.taskStart(jobId);
        return Result.success();
    }
}
